﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pattern_Prototype
{
    class Program
    {
        static void Main(string[] args)
        {
            //书本上的测试代码
            Prototype p1 = new ConcretePrototype1("I");
            Prototype c1 = p1.Clone();
            Console.WriteLine("Cloned:{0}", c1.Id);


            //我的测试代码
            Console.WriteLine();
            Prototype p2 = new ConcretePrototype2("Hello");
            Prototype c2 = p2.Clone();
            p2.Id = "Hello,World";
            Console.WriteLine("p2:{0} c2:{1}", p2.Id, c2.Id);//貌似string 是个值类型?

        }
    }
}
